//Faculty of Computer Science and Engineering
//Ho Chi Minh City University of Technology
//Initial code for Assignment 3 - Programming Fundamentals 501127 - Spring 2009
//Author: Nguyen Ho Man Rang
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <string.h>
#include <math.h>

using namespace std;

//Using a struct Crystal, describe objects Crystals. 
//A Crystal have 2 attribute: level and a pointer called nextCrystal type's Crystal
//this pointer point to other Crystals
struct Crystal {
	int level;
	Crystal* nextCrystal;
};


// Struct musketeer. each object musketeer have some attributes. HP is health power present
// the pointer pC1 point to list of objects Crystal sapphire, npC1 indicate number of sapphire
struct musketeer {
	int HP;
	Crystal* pC1; int npC1;
	Crystal* pC2; int npC2;
	Crystal* pC3; int npC3;
};


const double QUEZACOLT	= 0.5;
const double BAHAMUT	= 0.9;
const double CERBERUS	= 0.7;
const double IFRIT		= 0.8;
const double SIREN		= 0.4;
const double LEVIATHAN	= 1;

void init(int D[], int A[], int P[], int R[], musketeer M[]); //initialize the originally values of the musketeers
int battle(musketeer M[], int I, int E[], int nEvent); //process the events sequence.

void newCrystal(Crystal*& pointer, int num, int level); //Create a new Crystal
void deleteCrystal(Crystal* pointer); //Delete a Crystal.
